<div class="grid_9">

<div class="inner-border">
<h6>Enrolled Subjects</h6>

<table>
	<tr>
    	<td><strong>IDNO: </strong><?php echo $profile->id_no; ?></td>
        <td><strong>Name: </strong><?php echo $profile->lastname.', '.$profile->firstname.' '.$profile->middlename; ?></td>
        <td><strong>Course: </strong><?php echo $profile->course_code; ?></td>
        <td><strong>Year Level: </strong><?php echo $profile->level_name; ?></td>
    </tr>
</table>
	<?php if(!empty($db_entries)):?>
   <form action="<?php echo site_url('admin/approve_subjects'); ?>" method="post" accept-charset="utf-8" name="select_subjects" class="admin-form" id="verify_subjects">
   	<?php echo form_hidden('id_no', $profile->id_no);?>
        <ul class="course-list">
        <?php foreach($db_entries as $db_entry):?>
            <li class="input-block">
            <?php 
                $data = array(
                    'name'        => 'selectedsubjects[]',
                    'value'       => $db_entry->id,
                );
                echo form_checkbox($data).'<span>'.$db_entry->subject_name.'</span>';
            ?>
            </li>
        <?php endforeach;?>
        </ul>
    <div class="input-block">
    <?php echo form_submit('approve', 'Approve'); ?>
    </div>
    
    </form>
      <?php else: ?>
    <div class="notice">No subjects to approve</div>
    
    <?php endif;?>

    
    <h6>Approved Subjects</h6>
    
    <?php if(!empty($db_entries2)):?>
    <form action="<?php echo site_url('admin/cancel_approvement'); ?>" method="post" accept-charset="utf-8" name="cancel_approvement" class="admin-form" id="cancel_approvement">
   	<?php echo form_hidden('id_no', $profile->id_no);?>
        <ul class="course-list">
        <?php foreach($db_entries2 as $db_entry):?>
            <li class="input-block">
            <?php 
                $data = array(
                    'name'        => 'selectedsubjects[]',
                    'value'       => $db_entry->id,
                );
                echo form_checkbox($data).'<span>'.$db_entry->subject_name.'</span>';
            ?>
            </li>
        <?php endforeach;?>
        </ul>
    <div class="input-block">
    <?php echo form_submit('cancel', 'Cancel Approvement'); ?>
    </div>
    
    </form>
    <?php else: ?>
    <div class="notice">No approved subjects yet</div>
    
    <?php endif;?>
</div>

<form action="<?php echo site_url('admin/approve_student'); ?>" method="post" accept-charset="utf-8" name="cancel_approvement" class="admin-form" id="cancel_approvement">
	<?php echo form_hidden('id_no', $profile->id_no);?>
	<input type="submit" value="Approve Enrollment" <?php echo empty($db_entries2) ? 'disabled="disabled"' : ''; ?>/>
</form>
</div>